package eu.vranckaert.vvl.activities;

import eu.vranckaert.vvl.activities.preferences.PreferenceActivity;
import eu.vranckaert.vvl.activities.test.MyActivityTestCase;
import eu.vranckaert.vvl.activities.trafficinfo.TrafficInfoGraphicalActivity;
import eu.vranckaert.vvl.activities.trafficinfo.TrafficInfoTextActivity;

/**
 * User: DIRK VRANCKAERT
 * Date: 23/02/12
 * Time: 19:20
 */
public class DashboardActivityTest extends MyActivityTestCase<DashboardActivity> {
    public DashboardActivityTest() {
        super(DashboardActivity.class);
    }

    public void testClickTextButton() {
        solo.assertCurrentActivity("The dashboard activity is expected", DashboardActivity.class);
        solo.clickOnButton(0);
        solo.assertCurrentActivity("The traffic information TEXT activity is expected", TrafficInfoTextActivity.class);
    }

    public void testClickGraphicalButton() {
        solo.assertCurrentActivity("The dashboard activity is expected", DashboardActivity.class);
        solo.clickOnButton(1);
        solo.assertCurrentActivity("The traffic information GRAPHICAL activity is expected", TrafficInfoGraphicalActivity.class);
    }

    public void testClickPreferenceButton() {
        solo.assertCurrentActivity("The dashboard activity is expected", DashboardActivity.class);
        solo.clickOnButton(2);
        solo.assertCurrentActivity("The preferences activity is expected", PreferenceActivity.class);
    }
}
